package model

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	StoreID int64   `gorm:"type:int"`
	GoodID  int64   `gorm:"type:int"`
	OrderSn string  `gorm:"type:varchar(255)"`
	Name    string  `gorm:"type:varchar(100)"`
	Price   float64 `gorm:"type:decimal(10,2)"`
	Stock   int     `gorm:"type:int"`
	Img     string  `gorm:"type:varchar(255)"`
	Total   float64 `gorm:"type:decimal(10,2)"`
}
type OrderItem struct {
	gorm.Model
	StoreID   int64   `gorm:"type:int"`
	GoodID    int64   `gorm:"type:int"`
	OrderID   int64   `gorm:"type:int"`
	GoodName  string  `gorm:"type:varchar(100)"`
	GoodPrice float64 `gorm:"type:decimal(10,2)"`
	GoodStock int     `gorm:"type:int"`
	GoodImg   string  `gorm:"type:varchar(255)"`
	SubTotal  float64 `gorm:"type:decimal(10,2)"`
}
